package com.airwallex.strategy.impl;

import com.airwallex.model.ExpParam;
import com.airwallex.strategy.CalculateStrategy;
import com.airwallex.util.CalculatorUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Stack;

/**
 * 清除栈
 */
public class ClearStrategy implements CalculateStrategy {

    @Override
    public void execCalc(Stack<ExpParam> numbers, Stack<List<ExpParam>> logs) {
        while (!numbers.isEmpty()) {
            numbers.pop();
        }

        List<ExpParam> list = new ArrayList<>();
        list.add(null);
        logs.push(list);
    }
}
